// 填报页容器
.anvil-code-filling-container {
  padding: 12px;
  height: 100%;
  overflow: hidden auto;
}

.anvil-code-form {
  --anvil-code-font-size: 12px;

  // 提供给组件的左中右布局方式
  .anvil-code-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .anvil-code-middle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .anvil-code-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  // 右侧悬浮
  .anvil-code-float-right {
    float: right;

    &::after {
      content: '';
      display: table;
      clear: both;
    }
  }

  // 面包屑
  .anvil-code-breadcrumb {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    height: 35px;

    .el-breadcrumb {
      position: absolute;
      left: 10px;
      z-index: 1;
    }

    &::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      width: 100vw;
      height: 35px;
      background-color: #f2f2f2;
      border-top: 1px solid #cfcfcf;
      border-bottom: 1px solid #cfcfcf;
    }

    &-item {
      .el-breadcrumb__inner {
        font-size: var(--anvil-code-font-size);
      }

      &:last-of-type {
        .el-breadcrumb__inner {
          font-size: 14px;
          color: #277cd0;
        }
      }
    }
  }

  // 文本提示
  .anvil-code-paragraph {
    font-size: var(--anvil-code-font-size);
    color: #555;
  }

  // 自定义按钮组
  .anvil-code-custom-button-group {
    // display: flex;
    // align-items: center;
    // justify-content: center;
  }

  // 日期区间
  .anvil-code-date-range {
    width: 100%;

    .el-range-input {
      font-size: var(--anvil-code-font-size);
    }
  }

  // 分页
  .anvil-code-pagination {
    font-size: var(--anvil-code-font-size);
    color: #666666;
  }

  // 下拉框
  .anvil-code-select {
    .el-select__wrapper {
      min-height: 24px;
    }
  }

  // 输入框
  .anvil-code-input {
    .el-input__inner {
      height: 24px;
    }
  }

  // 如果分页在上方则调小间距
  .pagination-container + .anvil-code-table {
    margin-top: 2px;
  }

  // 自定义表格
  .anvil-code-table {
    margin-top: 20px;
    th.el-table__cell {
      height: 100%;
      background-color: #fafafa;
      font-size: var(--anvil-code-font-size);
    }

    .el-table__cell {
      padding: 4px 0;
    }

    .el-table__body tr:hover > td.el-table__cell {
      background-color: #ffffb3;
      border-bottom-color: #eacf99;
      border-right-color: #ffffb3;
    }
  }

  // tab标签页
  .el-tabs {
    margin-top: 10px;
    --el-tabs-header-height: 30px;
  }
  .el-tabs__nav {
    border: unset;
    gap: 4px;
  }
  .el-tabs__item {
    border-radius: 4px 4px 0 0;
    border: 1px solid #bfbfbf;

    &:hover {
      color: #fff;
      background-color: #2a92cd;
    }
  }
  .el-tabs__item.is-active {
    color: #fff;
    background-color: #0061c4;
  }

  .el-tabs--card > .el-tabs__header {
    border-bottom: 2px solid #0061c4;
    .el-tabs__nav {
      border: unset;
    }

    .el-tabs__item {
      border-left: 1px solid #bfbfbf;
      border-bottom: 1px solid #0061c4;
      transition: none;

      &:first-child {
        border-left: 1px solid #bfbfbf;
      }
    }

    .el-tabs__item.is-active {
      border-bottom-color: #0061c4;
    }
  }

  // 表单项标题
  .el-form-item__label {
    font-size: var(--anvil-code-font-size);
    color: #555;
  }

  // 输入框placeholder
  .el-input__inner {
    font-size: var(--anvil-code-font-size);
  }

  // 下拉框
  .el-select__wrapper {
    font-size: var(--anvil-code-font-size);
  }

  // 多行文本
  .el-textarea__inner {
    font-size: var(--anvil-code-font-size);
  }

  // 分页
  .el-pagination {
    --el-pagination-font-size: var(--anvil-code-font-size);
  }

  // avue相关样式
  .el-col > .el-form-item {
    margin-bottom: 4px;

    // 隐藏报错提示字段
    .el-form-item__error {
      display: none;
    }
  }
  .avue-form__tabs {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .avue-group {
    .el-collapse-item__header {
      margin-bottom: 0;
      position: relative;

      .avue-group__header {
        margin-left: 23px;
        .avue-group__title {
          color: #3c99dc;
          font-weight: bold;
        }
        &:hover {
          .avue-group__title {
            color: #ff6600;
          }
        }
      }

      .el-collapse-item__arrow {
        width: 16px;
        height: 16px;
        position: absolute;
        left: 0;
        background: url('@code/assets/img/arrow3_r.png') center left no-repeat;

        svg {
          display: none;
        }
      }
    }

    // 取消每个字段左右的padding
    .avue-form__group > .el-col {
      padding: 0 !important;
    }
  }
}

// 弹框
.anvil-code-dialog {
  padding: 0;

  .el-dialog__header {
    padding: 0 20px;
    height: 40px;
    line-height: 40px;
    background: #1d5fbd;

    .el-dialog__title {
      font-size: 18px;
      color: #fff;
    }

    .el-dialog__headerbtn {
      width: 40px;
      height: 40px;

      .el-icon {
        color: #fff !important;
        font-size: 20px !important;
      }
    }
  }

  .el-dialog__body {
    padding: 10px !important;
    min-height: 600px;
    max-height: 850px;
    overflow-y: auto;
  }

  .el-dialog__footer:empty {
    display: none;
  }
}

// 二次确认样式
.anvil-code-confirm {
  padding: 5px;
  .el-dialog__header {
    height: auto;
    border-bottom: 0;
  }
  .el-dialog__header.show-close {
    padding-right: 0;
  }

  .anvil-code-confirm-header {
    font-size: 14px;
    font-weight: bold;
    color: #298ac7;
    padding: 4px 5px 6px 5px;
    border-bottom: 1px dotted #c2cedb;
  }

  .anvil-code-confirm-body {
    line-height: 16px;
    color: #333;
    font-size: 12px;
    // padding: 16px 5px;
  }

  .anvil-code-confirm-footer {
    text-align: right;
    border-top: 1px dotted #ddd;
    padding: 10px 5px;
  }

  .el-dialog__footer {
    border-top: 0;
    padding-top: 0;
  }
}

// 提醒样式
.el-message-box {
  .el-message-box__title {
    font-size: 14px;
    font-weight: bold;
    color: #298ac7;
    padding: 4px 5px 6px 5px;
    border-bottom: 1px dotted #c2cedb;
  }

  .el-message-box__content {
    font-size: 12px;
  }

  .el-message-box__btns {
    .el-button {
      height: 24px;
      border-radius: 3px;
      padding: 0 10px;
      font-size: 12px;
      background-color: #4b90c8;
      color: #fff;
      border-color: #4b90c8;

      &:hover {
        background-color: #00489e;
        border-color: #00489e;
      }
    }
  }
}

// 自定义按钮
.anvil-code-custom-button {
  height: 24px;
  border-radius: 3px;
  padding: 0 10px;
  font-size: 12px;

  > span:empty {
    display: none;
  }
}
.anvil-code-custom-button.is-link {
  padding: 0 2px;
}

// 默认的确定按钮样式
.anvil-code-pirmary-btn {
  background-color: #4b90c8;
  color: #fff;
  border-color: #4b90c8;

  &:hover {
    background-color: #00489e;
    border-color: #00489e;
  }
}
